<?php
// 获取最新发布文章
// header("content-type:text/html;charset=UTF-8");
include_once("conn.php");

$select_date = "SELECT * FROM tips_infos ORDER BY tips_ID DESC";

$result_date = mysqli_query($connect_DB, $select_date);

if ($result_date) {
    if (mysqli_num_rows($result_date) > 0) {
        $count = 1;
        while ($row_date = mysqli_fetch_object($result_date)) {
            echo "
                <li>
                    <div class='xuhao'>" . $count . "</div>
                    <div class='biaoti'><a href='user_Tips.php?id=" . $row_date->tips_ID . "'>" . $row_date->tips_Title . "</a></div>
                    <div class='shijian'>" . substr($row_date->tips_Date, 0, 10) . "</div>
                </li>
            ";
            $count++;
        }
    }else{
        echo "<li class='none-tips'> 暂无数据 </li>";
    }
}else{
    echo "<li class='none-tips'> 查询出错".$select_date." </li>";
}

?>